<template>
  <div class="goods-box" style="background-color: #f4f4f4">
    <div class="gengduo">
      <div class="gengduo1">
        <div
          v-for="(b,index) in haoxie"
          :key="index"
          style="width: 99%; background-color: #fff"
        >
          <img :src="b.img" style="width: 100%" />
          <p>{{ b.name }}</p>
          <p>
            <van-icon name="clock" style="padding-right:.05rem"/>{{ b.miaoshu1 }}<van-icon name="warning" style="padding-left:.1rem;padding-right:.05rem"/>{{ b.miaoshu2 }}
          </p>
          <div style="display: flex; justify-content: space-between;padding-bottom:.11rem">
            <p style="font-size: 0.13rem; padding-left: 0.1rem;color:#ccc">
              <van-icon name="friends" />{{ b.username }}
            </p>
            <span style="font-size:.12rem;margin-right:.11rem;color:#C4C4C4"><van-icon name="good-job-o" size=".17rem"/>{{ b.number }}</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import axios from "axios";
export default {
  name: "goodshaoxie",
  props:{
        type:String
    },
  data() {
    return {
      typeObj:{
              "left":"左",
              "right":"右",
          },
      haoxie: [],
    };
  },
  created() {
    axios({
      url: "/haoxie",
      method: "get",
      params:{
                type:this.type
            }
    }).then((res) => {
      this.haoxie = res.data;
      console.log(res.data);
    });
  },
};
</script>
<style scoped>
.gengduo {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.gengduo div {
  margin-top: 0.1rem;
}
.gengduo p:nth-child(2) {
  font-size: 0.17rem;
  padding-left: 0.1rem;
}
.gengduo p:nth-child(3) {
  margin-top: 0.16rem;
  padding-left: 0.1rem;
  font-size: 0.13rem;
}
</style>